﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <SolidColorBrush x:Key="darkDark" Color="{StaticResource {x:Static SystemColors.ControlDarkDarkColorKey}}"/>
    <Style x:Key="darkApp">
        <Setter Property="Window.Background" Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"/>
    </Style>
    <Style x:Key="darkGridSplitter" TargetType="GridSplitter">
        <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
    </Style>
    <Style x:Key="darkHeader" TargetType="GridViewColumnHeader">
        <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
    </Style>
    <Style x:Key="darkListBox" TargetType="ListBox">
        <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
    </Style>
    <Style x:Key="darkListBoxItem" TargetType="ListBoxItem">
        <Setter Property="Focusable" Value="False"/>
    </Style>
    <Style x:Key="darkListView" TargetType="ListView">
        <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
    </Style>
    <Style x:Key="darkStackPanel" TargetType="StackPanel">
        <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"/>
    </Style>
    <Style x:Key="darkTabItem" TargetType="TabItem">
        <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"/>
    </Style>
    <Style x:Key="darkTabControl" TargetType="TabControl">
        <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"/>
    </Style>
    <Style x:Key="darkTextBlock" TargetType="TextBlock">
        <Setter Property="Margin" Value="3,-1,0,0"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>
    <Style x:Key="darkTextBox" TargetType="TextBox">
        <Setter Property="Background"  Value="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"/>
        <Setter Property="Focusable" Value="True"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="IsReadOnly" Value="True"/>
        <Setter Property="VerticalAlignment" Value="Bottom"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="Margin" Value="3,2,0,1"/>
        <Setter Property="FontFamily" Value="Lucida Console"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Text.Length}" Value="0">
                <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="darkTextInputBox" TargetType="TextBox">
        <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"/>
        <Setter Property="Focusable" Value="True"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="VerticalAlignment" Value="Bottom"/>
        <Setter Property="Height" Value="23"/>
        <Setter Property="Margin" Value="0,3,0,0"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Text.Length}" Value="0">
                <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
            </DataTrigger>
            <Trigger Property="Validation.HasError" Value="true">
                <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self},
                        Path=(Validation.Errors).CurrentItem.ErrorContent}" />
            </Trigger>
        </Style.Triggers>
    </Style>
</ResourceDictionary>
